'''
    删
'''
import pymysql

try:
    myconn = pymysql.connect(host='localhost', port=3306, db='shuoGG', user='root', password='ut123456', charset='utf8mb4')
    sql = "delete from student where sname='小光'"
    cur = myconn.cursor()
    modcount = cur.execute(sql)     # 返回影响行数
    print(modcount)
    myconn.commit()
    cur.close()
    myconn.close()
    
except Exception as e:
    print(e.message)



